-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add and announce local gas profiling via CLI and VM in Aptos.dev #7457
Conversation
developer-docs-site/docs/cli-tools/aptos-cli-tool/use-aptos-cli.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding these instructions!
developer-docs-site/docs/cli-tools/aptos-cli-tool/use-aptos-cli.md
Outdated
Show resolved
Hide resolved
developer-docs-site/docs/cli-tools/aptos-cli-tool/use-aptos-cli.md
Outdated
Show resolved
Hide resolved
|
||
Run the gas profiler by appending the `--profile-gas` option to the aptos CLI `move publish`, `move run` or `move run-script` command, for example: | ||
```bash | ||
cargo run -p aptos -- move publish --profile-gas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change this to aptos move publish --profile-gas
and I'll release a new version of the CLI tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks!
developer-docs-site/docs/cli-tools/aptos-cli-tool/use-aptos-cli.md
Outdated
Show resolved
Hide resolved
developer-docs-site/docs/cli-tools/aptos-cli-tool/use-aptos-cli.md
Outdated
Show resolved
Hide resolved
### Debug and print stack trace | ||
### Profiling gas use | ||
|
||
This *experimental* feature lets you [profile gas usage](https://github.com/aptos-labs/aptos-core/tree/main/aptos-move/aptos-gas-profiling) in the Aptos virtual machine locally rather than [simulating transactions](../../concepts/gas-txn-fee.md#estimating-the-gas-units-via-simulation) at the [fullnode](https://fullnode.devnet.aptoslabs.com/v1/spec#/operations/simulate_transaction). You may also use it to visualize the transaction gas log, in the form of a flame graph. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we don't necessarily have to mention the concept of the transaction gas log to the user as it is an internal implementation detail that is subject to change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. I have removed references to the transaction log.
My pleasure! This is an excellent feature. :-D |
Description
From:
#6535
Test Plan
Build and test locally